/*******************************************************************************
 * Copyright (c) 2010, 2030 www.mahao.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.itlaobing.ssm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import cn.itlaobing.ssm.entity.User;
import cn.itlaobing.ssm.mapper.UserMapper;
import cn.itlaobing.ssm.service.UserService;

/** 
 * ClassName: UserServiceImpl <br/> 
 * Function: TODO 功能描述 <br/> 
 * date: 2019年4月2日 下午3:54:17 <br/> 
 * 
 * @author Mmmmm 
 * @version  
 * @since JDK 1.8 
 */
@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper userMapper;

	@Override
	public User getOne(int id) {
		if(StringUtils.isEmpty(id)){
			id = 1;
		}
		return userMapper.selectByPrimaryKey(id);
	}

}
